import { ShopCouponBatchDTO } from '@/types/param/coupon'
import request from '@/utils/request'
import R from '@/types/conduit/R'
import CouponBatch from '@/types/entity/CouponBatch'
export const putShopCouponBatch = (shopCouponBatchDTO: ShopCouponBatchDTO): Promise<R<null>> =>
  request({
    url: `/coupon/coupon-batch/putShopCouponBatch`,
    method: 'PUT',
    data: shopCouponBatchDTO
  })
export const queryShopCouponBatchList = (): Promise<R<CouponBatch[]>> =>
  request({
    url: `/coupon/coupon-batch/shop-coupon-batch`,
    method: 'GET'
  })

export const deleteShopCouponBatch = (couponBatchId: number): Promise<R<null>> =>
  request({
    url: `/coupon/coupon-batch/deleteShopCouponBatch/${couponBatchId}`,
    method: 'DELETE'
  })
export const queryShopCouponBatch = (couponBatchId: number): Promise<R<ShopCouponBatchDTO>> =>
  request({
    url: `/coupon/coupon-batch/shop-coupon-batch/${couponBatchId}`,
    method: 'GET'
  })
